package com.qixin.total.controller;

import com.qixin.api.bean.ComUser;
import com.qixin.api.service.ComUserService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

/**
 * Created by aa on 2018/10/28.
 * 密码修改
 * 李许多
 */


@Controller
@RequestMapping("/password")
public class PasswordController {
    private static final Logger logger = LoggerFactory.getLogger(PasswordController.class);
    @Autowired
    ComUserService comUserService;

    @RequestMapping("/main.html")
    public String carftl(){
        return "pingtai/password";
    }

    /*
    密码管理
     */
    @RequestMapping(value = "update", method = RequestMethod.POST)
    @ResponseBody
    public boolean update(ComUser comUser,HttpSession session){
        if (comUserService.update(comUser,session)){
            return true;
        }
        return false;
    }




}
